package cuongnh.project.japanesediary.vocabulary.ui.perspective;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import cuongnh.project.japanesediary.vocabulary.ui.view.CategoryListView;
import cuongnh.project.japanesediary.vocabulary.ui.view.CategorySentencesView2;

public class CategoryWithSentencesPerspective implements IPerspectiveFactory {

	@Override
	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);

		// leftFolder
		IFolderLayout leftFolder = layout.createFolder("leftFolder",
				IPageLayout.LEFT, 0.2f, editorArea);
		leftFolder.addView(CategoryListView.ID);

		// rightFolder
		IFolderLayout rightFolder = layout.createFolder("rightFolder",
				IPageLayout.TOP, 1f, "bottomFolder");
		rightFolder.addView(CategorySentencesView2.ID);		

		layout.getViewLayout(CategoryListView.ID).setCloseable(false);

	}

}
